#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QMainWindow>
#include "DataBaseAgent.h"
#include "INoteView.h"
#include "DataProvider.h"

namespace Ui {
class MainWindow;
}

class MainWindow : public QMainWindow
{
	Q_OBJECT

	QList<INoteView*> _views;
	INoteView* _currentView;
	DataProvider* _provider;

	Ui::MainWindow *ui;
	bool _expanded;
	QTimer* _timer;

	void setCurrentView(INoteView* view);
	void animateWindow(bool hide);
	
public:
	explicit MainWindow(QWidget *parent = 0);
	~MainWindow();

protected:
	void resizeEvent(QResizeEvent* event);

	void closeEvent(QCloseEvent *event);
	void readSettings();

public slots:

	void onBtnHidePanel();
	void onBtnShowPanel();
	void endAnimation();

	void onAbout();
	void onSendMail();
	void onHelp();
	void onMakeBackup();

	void onTimerSignal();

	void onBtnAddNote();
	void onBtnEditNote(Note* note);

	void onWindowStyleChanged(QAction*);
	void onTableStyleChanged(QAction*);

	void onDBStateChanged();
};

#endif // MAINWINDOW_H
